Pāṇini (Sanskrit: पाणिनि, IPA: [pɑːɳin̪i]; a patronymic meaning "descendant of Paṇi") was a Sanskrit grammarian from Pushkalavati, Gandhara, in modern day Charsadda District of Khyber Pakhtunkhwa, Pakistan (fl. 6th century BC).
Pāṇini is known for his Sanskrit grammar, particularly for his formulation of the 3,959 rules of Sanskrit morphology, syntax and semantics in the grammar known as Ashtadhyayi (अष्टाध्यायी Aṣṭādhyāyī, meaning "eight chapters"), the foundational text of the grammatical branch of the Vedanga, the auxiliary scholarly disciplines of Vedic religion.
The Ashtadhyayi is one of the earliest known grammars of Sanskrit, although Pāṇini refers to previous texts like the Unadisutra, Dhatupatha, and Ganapatha. It is the earliest known work on descriptive linguistics, and together with the work of his immediate predecessors (Nirukta, Nighantu, Pratishakyas) stands at the beginning of the history of linguistics itself. His theory of morphological analysis was more advanced than any equivalent Western theory before the mid 20th century, and his analysis of noun compounds still forms the basis of modern linguistic theories of compounding, which have borrowed Sanskrit terms such as bahuvrihi and dvandva.
The Ashtadhyayi (IAST: Aṣṭādhyāyī) is the central part of Pāṇini's grammar, and by far the most complex. It is the earliest complete grammar of Classical Sanskrit, and in fact is of a brevity and completeness unmatched in any ancient grammar of any language. It takes material from the lexical lists (Dhatupatha, Ganapatha) as input and describes algorithms to be applied to them for the generation of well-formed words. It is highly systematised and technical. Inherent in its approach are the concepts of the phoneme, the morpheme and the root. His rules have a reputation for perfection — that is, they are claimed to describe Sanskrit morphology fully, without any redundancy. A consequence of his grammar's focus on brevity is its highly unintuitive structure, reminiscent of modern notations such as the "Backus–Naur Form". His sophisticated logical rules and technique have been widely influential in ancient and modern linguistics.
It is likely that Pāṇini's grammar and the Rg Veda are the only texts that were passed from one generation to another without being amended. In the Ashtadhyayi language is observed in a manner that has no parallel among Greek or Latin grammarians. Pāṇini's grammar marks the entry of the non-sacred into Indian thought, and according to Renou and Filliozat, it then defines the linguistic expression of that thought.
The great thinkers of ancient India were primarily linguists. It is not possible to understand fully the works of theologians/philosophers such as Shankara, Ramanuja and Madhva without a knowledge of Pāṇini. The Ashtadhyayi is fundamental to the structure of their thinking. It is not a didactic grammar, as it presupposes a knowledge of Sanskrit. Gradually, mainly after the X century CE, manuals were produced that reorganised the Ashtadhyayi for didactic purposes. These generally had simpler structures and were less ambitious than their Ashtadhyayi source.
Pāṇini made use of a technical metalanguage consisting of a syntax, morphology and lexicon. This metalanguage is organised according to a series of meta-rules, some of which are explicitly stated while others can be deduced. The two fundamental principles on which the metalanguage is based are non-redundancy, or the principle of economy, and the necessity of all the rules in the Ashtadhyayi.
The Ashtadhyayi consists of 3,959 sutras (sūtrāṇi) or rules, distributed among eight chapters, which are each subdivided into four sections or padas (pādāḥ). From example words in the text, and from a few rules depending on the context of the discourse, additional information as to the geographical, cultural and historical context of Pāṇini can be discerned.